#ifndef ROUTE_H
#define ROUTE_H

#include <QGLWidget>
struct s_route
{
    double x0, y0, z0;
    double vx, vy, vz;
    double ax, ay, az;

    double r0, p0, j0;
    double vr, vp, vj;
    double ar, ap, aj;
};


struct s_attitude
{
 double r; double p; double j;
 void rotation_matrix( double* rot );
};

struct s_point3d
{
 double X; double Y; double Z;
};

struct s_point2d
{
 double x; double y;
};

class Route : public QGLWidget
{
    Q_OBJECT
    QVector<s_point3d> m_dots;
public:
    Route( const QVector<s_point3d>& dots, QWidget *parent = 0);

protected:
    void initializeGL();
    void resizeGL(int width, int height);
    void paintGL();
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);

private:
    void draw();
    int objectAtPosition(const QPoint &pos);


    GLfloat rotationX;
    GLfloat rotationY;
    GLfloat rotationZ;
    QPoint lastPos;
};



#endif // ROUTE_H
